<template>
  <div class="main">
    <div class="head">
      <div
        class="h1"
        :style="head ? 'color:#323232;border-bottom: 4px solid #f8b100;' : ''"
        @click="head = !head"
      >
        按回复
      </div>
      <div
        class="h1"
        @click="head = !head"
        :style="head ? '' : 'color:#323232;border-bottom: 4px solid #f8b100;'"
      >
        最新
      </div>
    </div>
    <div class="body">
      <div style="display: flex; margin-bottom: 30px" v-for="i in 8" :key="i">
        <div class="card">
          <img src="../../../public/imgs/cat.jpg" alt="" />
          <div class="txt">
            <div
              style="
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
                width: 70%;
                margin-bottom: 10px;
              "
            >
              #中山影视城《淋唔到》动漫嘉年华#
            </div>
            <div style="font-size: 14px">话题：0 关注：0</div>
          </div>
          <div class="btn">关注</div>
        </div>
        <div class="card">
          <img src="../../../public/imgs/cat.jpg" alt="" />
          <div class="txt">
            <div
              style="
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
                width: 70%;
                margin-bottom: 10px;
              "
            >
              #中山影视城《淋唔到》动漫嘉年华#
            </div>
            <div style="font-size: 14px">话题：0 关注：0</div>
          </div>
          <div class="btn">关注</div>
        </div>
      </div>
      <el-pagination
  background
  layout="prev, pager, next"
  :total="1000">
</el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      head: true,
    };
  },
};
</script>

<style lang="scss" scoped>
.main {
  box-sizing: border-box;
  width: 1200px;
  margin: 0 auto;

  .head {
    width: 900px;
    background-color: #fcfcfc;
    display: flex;
    padding-left: 30px;
    border: 1px solid #e9e9e9;
    border-radius: 5px;
    .h1 {
      height: 50px;
      line-height: 50px;
      color: #999999;
      margin-right: 30px;
      border-bottom: 4px solid transparent;
    }
  }
  .body {
    margin-top: 30px;
    width: 80%;
    .card {
      background-color: #fcfcfc;
      padding: 20px;
      display: flex;
      margin-right: 20px;
      img {
        width: 80px;
        height: 80px;
        display: block;
        margin-right: 10px;
      }

      .btn {
        background-color: #f8b107;
        height: 20px;
        color: #fff;
        border-radius: 5px;
        line-height: 20px;
        font-size: 14px;
        padding: 0 15px;
      }
    }
  }
}
</style>